gl renderer: Force blur shadow node children offscreen
authorTimm Bäder <mail@baedert.org>
Sun, 13 Jan 2019 07:21:58 +0000 (08:21 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 13 Jan 2019 07:41:37 +0000 (08:41 +0100)
This broke the overlay blur demoe when resizing the window to a size
that would completely move the image below a button, causing the
GtkSnapshot code to remove the clip node below the blur node.

gsk/gl/gskglrenderer.c

index cdac8a1410a420ccc02c963f27dec7b805b16272..ead5894445d422eec922e2f5316156e10491aa7c 100644 (file)
@@ -1091,10 +1091,15 @@ render_blur_node (GskGLRenderer       *self,
   gboolean is_offscreen;
   RenderOp op;
 
+  /* TODO(perf): We're forcing the child offscreen even if it's a texture
+   * so the resulting offscreen texture is bigger by the gaussian blur factor
+   * (see gsk_blur_node_new), but we didn't have to do that if the blur
+   * shader could handle that situation. */
+
   add_offscreen_ops (self, builder,
                      &node->bounds,
                      gsk_blur_node_get_child (node),
-                     &texture_id, &is_offscreen, FALSE, TRUE);
+                     &texture_id, &is_offscreen, TRUE, TRUE);
 
   ops_set_program (builder, &self->blur_program);
   op.op = OP_CHANGE_BLUR;